/**
 * 
 */
package easyservice.protocol;


/**
 * @author Taciano Pinheiro
 *
 */
public class FaultCommand extends SyncCommand {
	
	private String faultType;
	private String message;

	/**
	 * @param faulType
	 * @param message
	 */
	public FaultCommand(String faultType, String message) {
		this.faultType = faultType;
		this.message = message;
	}

	/**
	 * @return the faultType
	 */
	public String getFaultType() {
		return faultType;
	}

	/**
	 * @param faultType the faultType to set
	 */
	public void setFaultType(String faultType) {
		this.faultType = faultType;
	}

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}
	
	/* (non-Javadoc)
	 * @see easyservice.protocol.AbstractCommand#generatedString()
	 */
	@Override
	public String generatedString() {
		StringBuffer generatedString = new StringBuffer("# " + CommandEnum.FAULT + " ");
		generatedString.append(this.getFaultType() + " " + this.getMessage());		
		return generatedString.toString();
	}
	

}
